package com.woniuxy.springcloud.consumer.student.feignclient;

import com.github.pagehelper.PageInfo;
import com.woniuxy.springcloud.common.entity.PageDto;
import com.woniuxy.springcloud.common.entity.ResponseResult;
import com.woniuxy.springcloud.common.entity.Student;
import org.springframework.stereotype.Component;

import java.util.List;

/**
 * description: StudentFeignClientFallback <br>
 * date: 2022/1/22 11:54 上午 <br>
 * author: shesaifei <br>
 * version: 1.0 <br>
 */
@Component
public class StudentFeignClientFallback implements StudentFeignClient {
    @Override
    public ResponseResult addStudent(Student student) {
        return null;
    }

    @Override
    public ResponseResult<Student> getStudent(Integer sid) {
        return new ResponseResult<>(500, "fallback", null);
    }

    @Override
    public ResponseResult<List<Student>> getAllStudent() {
        return null;
    }

    @Override
    public ResponseResult<PageInfo<Student>> findAllStudent(PageDto pageDto) {
        return null;
    }

    @Override
    public ResponseResult<String> timeout() {
        return new ResponseResult<String>(500, "xxx-timeout-fallback", "timeout");
    }

    @Override
    public ResponseResult<String> ok() {
        return null;
    }
}
